-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Link UI improvements #4909
Link UI improvements #4909
Conversation
Insert a placeholder <a> so that it is clear which text will be made into a link when creating a link using the RichText component.
Consolidate the dedicated 'remove link' button into the toolbar button that adds a link.
When editing or adding a link, ESCAPE should cancel editing mode and ENTER should submit the changes.
The link popup should widen to fit the URL within it.
c950657
to
1ccbcb8
Compare
Remove the placeholder link inserted when a new link is added when the user moves the selection elsewhere.
I'm AFK for the next two weeks and unfortunately did not get to finish this. Happy for someone to pick it up while I'm away if they're interested. Still to do:
The big problem that I got stuck on is having the selected text remain highlighted while the link UI is shown: This functionality doesn't happen natively because we have configured TinyMCE to not use an iframe. This means that when the link URL input is focused, the selected text loses its highlight. I had two ideas on how to move pass this limitation:
As my next step, I would look into adapting approach 1 to handle the selection edge case and to fix the undo state issue by using TinyMCE's ignore method. Failing that, we could, for now, abandon the highlight component of #4572 and just implement all of the other (still worthwhile) changes. cc. @iseulde and @azaozz since they're the in-house TinyMCE experts. |
Closing due to staleness. Will revisit this soon. |
🚧 Work in progress! 🚧
Fixes #4572.
Still to do: